package com.crop.back.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 质量检测记录表
 * </p>
 *
 * @author 作者
 * @since 2025-01-20
 */
@Getter
@Setter
@TableName("quality_inspection")
@ApiModel(value = "QualityInspection对象", description = "质量检测记录表")
public class QualityInspection implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("批次ID")
    @TableField("batch_id")
    private Long batchId;

    @ApiModelProperty("检测人员")
    @TableField("inspector")
    private String inspector;

    @ApiModelProperty("检测时间")
    @TableField("inspection_time")
    private LocalDateTime inspectionTime;

    @ApiModelProperty("检测项目，JSON格式")
    @TableField("inspection_items")
    private String inspectionItems;

    @ApiModelProperty("检测结果，JSON格式")
    @TableField("results")
    private String results;

    @ApiModelProperty("检测报告URL")
    @TableField("report_url")
    private String reportUrl;

    @ApiModelProperty("状态：0-不合格 1-合格")
    @TableField("status")
    private Integer status;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField("deleted")
    private Integer deleted;


}
